% === 图表编号与章节关联 ===
\usepackage{chngcntr}
\AtBeginDocument{%
  \counterwithin{figure}{section}
  \counterwithin{table}{section}
}

% === 每个章节前分页 ===
\usepackage{titlesec}
\AtBeginDocument{
  \let\OldSection\section
  \renewcommand{\section}{\clearpage\OldSection}
}

% === 页眉页脚 ===
\usepackage{fancyhdr}
\fancyhf{}
\fancyfoot[C]{\thepage}
\pagestyle{fancy}
\fancypagestyle{plain}{
  \fancyhf{}
  \fancyfoot[C]{\thepage}
}

\ctexset {
  section = {
    number =   % 禁止 ctex 自动编号
  }
}
